<template>
  <div>
    
  </div>
</template>

<script>
import { watch, inject, watchEffect, ref } from 'vue'
export default {
  // props: ['title'],

  setup(props, context) {
    // watch(props, (nextValue, preValue) => {
    //   let key = inject('key')
    //   console.log(key.value)
    //   // console.log(this)
    //   // console.log(nextValue.title)
    // })
    // console.log(context.props.title)

    let key = inject('key', ref('abc'))

    watchEffect(() => {
      // console.log(key.value)
    })

    return {
      title: 'aaaa'
    }
  }
}
</script>

<style lang='stylus' scoped>

</style>